package ntd.util.fun;

public class ComFun {

    /**
     * 出参函数
     * @param <T>
     */
    public interface FunOut<T> {
        T accept() throws Exception;
    }

    public interface FunOutNoException<T> {
        T accept();
    }

    /**
     * 空函数
     */
    public interface Fun {
        void accept() throws Exception;
    }

    public interface FunNoException {
        void accept();
    }

    /**
     * 入参函数
     * @param <T>
     */
    public interface FunIn<T> {
        void accept(T t) throws Exception;
    }

    public interface FunInNoException<T> {
        void accept(T t);
    }

    /**
     * 出入参数
     * @param <T>
     * @param <R>
     */
    public interface FunInOut<T, R> {
        R accept(T t) throws Exception;
    }

    public interface FunInOutNoException<T, R> {
        R accept(T t);
    }
}
